package org.osiris.persistence.controllers;

import java.util.List;

import javax.persistence.EntityManager;

import org.osiris.persistence.Subcategoria;
import org.osiris.persistence.controllers.exceptions.IllegalOrphanException;
import org.osiris.persistence.controllers.exceptions.NonexistentEntityException;
import org.osiris.persistence.controllers.exceptions.PreexistingEntityException;

public interface SucategoriaInterface {

	public abstract EntityManager getEntityManager();

	public abstract void create(Subcategoria subcategoria)
			throws PreexistingEntityException, Exception;

	public abstract void edit(Subcategoria subcategoria)
			throws IllegalOrphanException, NonexistentEntityException,
			Exception;

	public abstract void destroy(Long id) throws IllegalOrphanException,
			NonexistentEntityException;

	public abstract List<Subcategoria> findSubcategoriaEntities();

	public abstract List<Subcategoria> findSubcategoriaEntities(int maxResults,
			int firstResult);

	public abstract Subcategoria findSubcategoria(Long id);

	public abstract int getSubcategoriaCount();

}